package com.otitan.la.forest.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 菜单角色关系表
 *
 * @author jiacs
 * @email xxx
 * @date 2020-09-15 10:34:19
 */
@Data
@TableName("\"SYS_MENU_ROLE\"")
@ApiModel("菜单角色关系表实体")
public class MenuRoleEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 角色主键
     */
    @ApiModelProperty(value = "角色主键", required = true)
    @NotEmpty(message = "角色主键不能为空")
    @Length(max = 36, message = "角色主键不能超过 36 个字符")
    @TableId("\"ROLE_ID\"")
    private String roleId;

    /**
     * 菜单主键
     */
    @ApiModelProperty(value = "菜单主键", required = true)
    @NotEmpty(message = "菜单主键不能为空")
    @Length(max = 36, message = "菜单主键不能超过 36 个字符")
    @TableField("\"MENU_ID\"")
    private String menuId;

    /**
     * 创建用户
     */
    @ApiModelProperty(value = "创建用户", required = false)
    @TableField(value = "\"CREATE_USER\"", fill = FieldFill.INSERT)
    private String createUser;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", required = false)
    @TableField(value = "\"CREATE_DATE\"", fill = FieldFill.INSERT)
    private Date createDate;

}
